def fib(n: Int) = {

  var prev: BigInt = 0
  var cur: BigInt = 1

  for (i <- 0 until n) {
    val v = prev + cur
    prev = cur
    cur = v
  }

  cur
}

val n = args(0).toInt
println(fib(n))
